#! /bin/bash
set -e
echo "ITSM开始更新代码！"
git pull origin master
echo "itsm开始打包！"
mvn clean package -Dmaven.test.skip=true
echo "ITSM正在重启服务！"
ff=`ps -ef |grep myitsm-1.0 |grep -v grep |awk '{print $2}'`
for l in $ff
 do
   kill -9 $l
 done
nohup java -jar ./target/myitsm-1.0.jar --spring.profiles.active=itsm 1>out 2>&1 &
tail -f out
